<%@ page language="java" contentType="text/html; charset=UTF-8"
		 isELIgnored="false" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<script src="${requestScope.FPWEB.staticRootPath }/Js/Plugins/Echarts/echarts.min.js"></script>

<div class="wrap">
	<div class="J_Chart_Panel">
		<div class="h_a1" style="clear: both;">
			<span class="title">用户转化平均时长</span>
			<div class="yjd-tip">
				<div style="width:500px;">
					1、首充转化平均时长：在指定的时间段内[X，Y]在医界贷平台注册，在[X，Y+30]首充过，平均（首充时间-注册时间），借款用户不包含在内<br>
					2、首投转化平均时长：在指定的时间段内[X，Y]在医界贷平台注册，在[X，Y+30]首投过，平均（首投时间-注册时间），借款用户不包含在内
				</div>
			</div>
		</div>
		<form method="post" id="sumary" autocomplete="off"
			  action="${requestScope.FPWEB.rootPath }/userUse/summary${requestScope.FPWEB.urlStuff}">
			<div class="search_type cc">
				<label>起始时间：</label> <input type="input" max="${end }"
											min="${start }" name="start" class="input length_1 mr10 J_date"
											value="${start }"> <label>结束时间：</label> <input type="input"
																						   max="${end }" min="${start }" name="end"
																						   class="input length_1 mr10 J_date" value="${end }">
				<button id="search" type="button" class="btn length_1">搜索</button>
			</div>
		</form>
		<div class="count cc" id="cbox">
			<div class="c-box">
				<div class="c-box-head">首充转化时长（天）</div>
				<div class="c-box-con">
					<span name="firstPayUseTimes" class="number">0</span> <span>天</span>
				</div>
			</div>
			<div class="c-box">
				<div class="c-box-head">首投转化时长（天）</div>
				<div class="c-box-con">
					<span name="firstInvestUseTimes" class="number">0</span> <span>天</span>
				</div>
			</div>
		</div>
	</div>
	<script>
		YJD.use('AppAdminCommon');
		YJD.use('AppBICommon');
		var form = $("#sumary");
		$("#search").click(function() {
			addCompareData();
		});
		function addCompareData() {
			$.ajax({
				type : "post",
				url : form.attr("action"),
				data : form.serializeArray(), // 你的formid
				error : function(request) {
					alert("连接失败！");
				},
				success : function(result) {
					if (result.state == 1) {
						$("span[name='firstPayUseTimes']").text(
								result.data.firstPayUseTimes);
						$("span[name='firstInvestUseTimes']").text(
								result.data.firstInvestUseTimes);

					}
				}
			});
		}
		addCompareData();
	</script>
</div>